using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using DevExpress.XtraReports.UI;
using NetROS.Tiers.Entities;

namespace ReportiFin
{
    public partial class UplatniceIsplatniceIspis : DevExpress.XtraReports.UI.XtraReport
    {
        public UplatniceIsplatniceIspis()
        {
            InitializeComponent();
        }

         public UplatniceIsplatniceIspis(VList<VwBlagajnaStavka> blagajnaStavkas)
        {
            InitializeComponent();
             bindingSource1.DataSource = blagajnaStavkas;
        }


        private void xrLabel3_BeforePrint(object sender, System.Drawing.Printing.PrintEventArgs e)
        {
            if ( (decimal?)GetCurrentColumnValue("Ulaz") == 0)
            {
                xrLabel3.Text = String.Format("{0:n2}", (decimal?) GetCurrentColumnValue("Izlaz"));
            }
            else
            {
                xrLabel3.Text = String.Format("{0:n2}", (decimal?) GetCurrentColumnValue("Ulaz"));
            }
        }

        private void xrLabel10_BeforePrint(object sender, System.Drawing.Printing.PrintEventArgs e)
        {
              if ( (decimal?)GetCurrentColumnValue("Ulaz") == 0)
            {
                xrLabel10.Text = "I S P L A T N I C A";
            }
            else
            {
                 xrLabel10.Text = "U P L A T N I C A";
            }
        }

        private void xrLabel8_BeforePrint(object sender, System.Drawing.Printing.PrintEventArgs e)
        {
             if ( (decimal?)GetCurrentColumnValue("Ulaz") == 0)
            {
                xrLabel8.Text = "(uplatio)";
            }
            else
            {
                 xrLabel8.Text = "(primio)";
            }
        }

    }
}
